<template>
  <div id="prohibitlist"> 

          <el-table :data="datalist" style="width: 100%" :height="dtheight" :header-cell-style="{background:'#4F81BC',color:'white'}"
           :row-class-name="tableRowClassName"  :border="true">
 
                 <el-table-column label="开始时间"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span >{{ getTime_time(scope.row.second_start) }}</span>
                    </template>
                </el-table-column>   
                <el-table-column label="结束时间 "  align='center' >                   
                    <template slot-scope="scope">                   
                        <span >{{ getTime_time(scope.row.second_end) }}</span>
                    </template>
                </el-table-column>

                 <el-table-column label="操作" align='center' width="300px">
                    <template slot-scope="scope"> 
                        <el-button size="mini"  type="primary"  plain @click="delete_but(scope.row)">删除</el-button> 
                    </template>
                </el-table-column>        

  
            </el-table>  



   </div>
</template>

<script>

export default {
   name: 'prohibitlist',
   props:{
      datalist:{  
        //type:Array,
       default:()=>[]
     },
  },
  data () {
    return {
        dtheight:'500',  //窗口高度
    }
  },
   components:{

  },
  created(){
     this.dtheight = window.innerHeight -253
      
  },
  mounted (){
    
  },
  methods: {
    delete_but(row){


        this.$confirm('是否删除, 是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
                this.post("/ban_onsale/delete", {
                    id:row.id,
                }).then(res => {

                    if(res.error_code == 0){
                    this.open1(res.result,'success')  //提示框
                    this.$emit('up_list_fun')
                    }else {
                    this.open1(res.message,'warning')
                }

             })
        }).catch(() => {
                    
        });


        
 
    }


  }
}
</script>


<style scoped>

</style>